import App from '../App'

import Vue from 'vue'
import Router from 'vue-router'
const home = r => require.ensure([], () => r(require('../views/home/home')), 'home')
const daily = r => require.ensure([], () => r(require('../views/net/daily')), 'daily')
const month = r => require.ensure([], () => r(require('../views/net/month')), 'month')
const drive = r => require.ensure([], () => r(require('../views/net/drive')), 'drive')
const dtarget = r => require.ensure([], () => r(require('../views/net/dtarget')), 'dtarget')
const passenger = r => require.ensure([], () => r(require('../views/net/passenger')), 'passenger')
const otherKpi = r => require.ensure([], () => r(require('../views/net/otherKpi')), 'otherKpi')
const infoKpi = r => require.ensure([], () => r(require('../views/net/infoKpi')), 'infoKpi')
const other = r => require.ensure([], () => r(require('../views/net/other')), 'other')
const netKeyKpi = r => require.ensure([], () => r(require('../views/net/netKeyKpi')), 'netKeyKpi')
Vue.use(Router)

export default new Router({
  mode: 'hash',
  routes: [
    {
      path: '/',
      // name: '主页',
      component: App,
      children: [
        {
          path: '',
          redirect: '/home'
        },
        {
          path: '/home',
          component: home
        },
        {
          path: '/net/daily',
          component: daily
        },
        {
          path: '/net/daily',
          component: daily
        },
        {
          path: '/net/drive',
          component: drive
        },
        {
          path: '/net/passenger',
          component: passenger
        },
        {
          path: '/net/dtarget',
          component: dtarget
        },
        {
          path: '/net/otherKpi',
          component: otherKpi
        },
        {
          path: '/net/infoKpi',
          component: infoKpi
        },
        {
          path: '/net/other',
          component: other
        },
        {
          path: '/net/netKeyKpi',
          component: netKeyKpi
        },
        {
          path: '/net/month',
          component: month
        }

      ]
    }
  ]
})
